package com.one.common.utils.pinyin;


import com.one.common.model.bean.CityBean;

import java.util.Comparator;

public class PinyinComparator implements Comparator<CityBean> {

	public int compare(CityBean o1, CityBean o2) {
		if (o1.getFirst_pingyin().equals("@")
				|| o2.getFirst_pingyin().equals("#")) {
			return -1;
		} else if (o1.getFirst_pingyin().equals("#")
				|| o2.getFirst_pingyin().equals("@")) {
			return 1;
		} else {
			return o1.getFirst_pingyin().compareTo(o2.getFirst_pingyin());
		}
	}

}
